﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Setting.ascx.cs" Inherits="Admin_System_Controls_Setting" %>
<%@ Register Src="NhibernateControls/BaseInfo.ascx" TagName="BaseInfo" TagPrefix="uc1" %>
<%@ Register Src="NhibernateControls/RuntimeSetting.ascx" TagName="RuntimeSetting"
    TagPrefix="uc2" %>

<script language="javascript" type="text/javascript">
    $(document).ready(function() {
        $('#nhibernateSetting').tabs();

        $("#CreateCheckBox").click(function() {
            if (this.checked) {
                if (confirm("是否确认重建数据库中的所有表，选择是将会重建所有表，并且所有数据都会意思")) {
                    $("#<%=ButtonCreateTable.ClientID%>").attr("enabled", "enabled");
                }
                else { this.checked = false; }
            }
            else {
                $("#<%=ButtonCreateTable.ClientID%>").removeAttr("disabled", "disabled");
            }

        });
    });
</script>

<div>
    Configuration Files:
    <asp:DropDownList ID="DropDownListConfigFiles" runat="server" OnSelectedIndexChanged="FileChanging">
    </asp:DropDownList>
    <asp:Button ID="ButtonSave" runat="server" Text="Save" OnClick="Button_Click" />
</div>
<div>
    Session Factory Name:
    <asp:DropDownList ID="DropDownListSessionFactory" runat="server">
    </asp:DropDownList>
    Create Table
    <input type="checkbox" id="CreateCheckBox" />
    <asp:Button ID="ButtonCreateTable" runat="server" Text="CreateTables" OnClick="Button_Click" />
</div>
<div id="nhibernateSetting">
    <ul>
        <li class="ui-tabs-nav-item"><a href="#DriverType">DriverType</a></li>
        <li class="ui-tabs-nav-item"><a href="#runtime">Runtime</a></li>
        <li class="ui-tabs-nav-item"><a href="#mapping">Mapping</a></li>
    </ul>
    <div id="DriverType">
        <uc1:BaseInfo ID="BaseInfo1" runat="server" />
    </div>
    <div id="runtime">
        <uc2:RuntimeSetting ID="runtimeSetting" runat="server" />
    </div>
    <div id="mapping">
    </div>
</div>
